package com.basics.SmsVerify;

import java.util.Random;

public class CodeUtils {
    final  static char[] digits= {'0','1','2','3','4','5','6','7','8','9'};
    public static String getCode(){
        Random random = new Random();
        char[] cs = new char[6];
        for (int i=0 ; i<cs.length;i++){
            cs[i]=digits[random.nextInt(digits.length)];

        }
        return new String(cs);
    }

}
